home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / commercial / inovatronics / edgedemo / edgeeditor / rexx / menu_editkey.edge < prev    next >
Text File  |  1994-11-17  |  830b  |  51 lines

  1. /*
  2. ** $VER: EditKey.edge 1.2 (Sunday 19-Sep-93 13:57:38)
  3. **
  4. ** Edit a keyboard command
  5. **
  6. ** Written by Thomas liljetoft
  7. */
  8.  
  9.  
  10. options results
  11.  
  12. /* get the users error-report level */
  13.  
  14. getenvvar _ge_errlevel
  15. errlevel = result
  16.  
  17. /* ask for the key-description to edit */
  18.  
  19. 'requestkey' title '"Enter key to edit"'
  20. if RC == 0 then do
  21.  
  22.     /* ok, now get the command currently installed */
  23.  
  24.     key = result
  25.     'keyboard' key ask
  26.     if RC == 0 then do
  27.  
  28.     /* ask for a new command, but supply the current as 'default' */
  29.  
  30.         def = result
  31.         'requeststring' title '"Enter new definition."' default '"'def'"'
  32.         if RC == 0 then do
  33.  
  34.         /* change to the new command */
  35.  
  36.             'keyboard' key force result
  37.  
  38.             end
  39.         end
  40.     end
  41.  
  42. if RC >= errlevel then do
  43.  
  44.     /* something went wrong enought to be reported so report */
  45.  
  46.     'fault'
  47.     'requestnotify' result
  48.     end
  49.  
  50. exit(0)
  51.